﻿using PlaceOrder_Core.Services.Instances;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace PlaceOrder_Client.Converters
{
    public class FlagRowStyleSelector : StyleSelector
    {
        public Style Flag0Style { get; set; }
        public Style Flag1Style { get; set; }

        public override Style SelectStyle(object item, DependencyObject container)
        {
            var rowData = item as YiPingLilyTrade; // 根据你的实际数据类型替换
            if (rowData != null)
            {
                if (rowData.Flag == true)
                    return Flag0Style;
                else if (rowData.Flag == false)
                    return Flag1Style;
            }
            return base.SelectStyle(item, container);
        }
    }

}
